import { createSlice } from '@reduxjs/toolkit';

const counter = createSlice({
  name: 'counter',
  initialState: { count: 0 },
  reducers: {
    change(state, { payload }) {
      console.log(state, payload);
    },
  },
});

export const { change } = counter.actions;

export default counter.reducer;
